// App3.js

import React from 'react'
import Modal from './Modal'

class App3 extends React.Component {
    constructor(props) {
        super(props);
        this.state = {showModal: true};
    }

    closeModal = () => {
        this.setState({showModal: false});
    };

    render() {
        return (
            <div>
                <h2>Dashboard</h2>
                {this.state.showModal && (
                    <Modal onClose={this.closeModal}>Modal Dialog</Modal>
                )}
            </div>
        );
    }
}

export default App3;
